package com.read.util;

/**
 * @author sh-sunb6
 * @description 字符串工具类
 * @date 2019-02-22 16:34
 */
public class StringUtil {

    /**
     * @description 判断字符串是否为空
     * @author sh-sunb6
     * @date 2019-02-22 17:33
     */
    public static boolean isNotEmpty (String str) {
        return (null != str && !str.isEmpty());
    }

    /**
     * @description 生成随机6位数
     * @author sh-sunb6
     * @date 2019-02-22 16:34
     */
    public static String randomCode() {
        return ((Math.random() * 9 + 1) * 100000 + "").substring(0,6);
    }

    public static void main(String[] args) {
        System.out.println(randomCode());
    }

}
